{% extends "base.html" %}{% load bootstrap3 %}

{% block page_header %}
  <div class="page-header">
    <h1>{{ form.instance.slug|yesno:"Edit post,Create new post"|title }}</h1>
  </div>
{% endblock %}


{% block content %}
  {% if form.errors %}
    <div class="alert alert-error">
      <button class="close" data-dismiss="alert">×</button>
      There are problems with the form data - please review
    </div>
  {% endif %}
  <form action="." class="form col-md-7" method="post" enctype="multipart/form-data">
    {% csrf_token %}
    {% bootstrap_form form %}

    <div class="actions">
      <input type="submit" class="btn primary" value="{{ form.instance.slug|yesno:"Edit post,Create new post" }}">
    </div>
  </form>
{% endblock %}
